<div class="col-md-12">
    <div class="panel panel-primary">
        <header class="panel-heading">
            <div class="row">
                <div class="col-md-6">
                    <span class="col-sm-2"> Clusters </span>
                    <div class="col-sm-3">
                        <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar"
                               ng-model="showUnhealthyClusterOnly" ng-change="refresh()"/>
                        <label class="lbl" for="ace-settings-navbar">显示问题Cluster</label>
                    </div>
                </div>

                <div class="col-md-6 text-right">
                    <a type="button" class="btn btn-primary btn-sm"
                    href="/#/cluster_form?clusterName=&type=create">创建Cluster</a>
                </div>
            </div>
        </header>

        <table ng-table="tableParams" show-filter="true" class="table table-striped table-hover" ng-table-columns-binding="cols">
            <tr ng-repeat="cluster in $data">
                <td data-title="'cluster'" filter="{ clusterName : 'text' }">
                    <a href="/#/cluster_dc_shards/{{cluster.clusterName}}/">{{ cluster.clusterName }}</a>
                </td>
                <td ng-if="showUnhealthyClusterOnly" data-title="'详情'"><div title="{{cluster.message}}">详情</div></td>
                <td ng-if="true" data-title="'主数据中心'" ng-bind="getDcName({{cluster.activedcId}})"></td>
                <td ng-if="true" data-title="'描述'" ng-bind="cluster.clusterDescription | limitTo:50" ></td>
                <td ng-if="true" data-title="'组织'" ng-bind="cluster.clusterOrgName" ></td>
                <td ng-if="true" data-title="'联系人邮箱'" ng-bind="cluster.clusterAdminEmails| limitTo:50" ></td>
                <td ng-if="true" data-title="'操作'">
                	<a href="/#/cluster_dc?clusterName={{cluster.clusterName}}" class="btn btn-info btn-xs">数据中心</a>&nbsp;
                    <a href="/#/cluster_form?clusterName={{cluster.clusterName}}&type=retrieve" class="btn btn-info btn-xs">Cluster</a>&nbsp;
                    <a href="/#/cluster_shards?clusterName={{cluster.clusterName}}" class="btn btn-info btn-xs">Shards</a>&nbsp;
                    <a href="/#/cluster_form?clusterName={{cluster.clusterName}}&type=update" class="btn btn-info btn-xs">修改</a>
                    <a class="btn btn-danger btn-xs" ng-click="preDeleteCluster(cluster.clusterName)">删除</a>
                </td>
            </tr>
        </table>
    </div>
</div>

<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
    <i class="icon-double-angle-up icon-only bigger-110"></i>
</a>


<xpipeconfirmdialog xpipe-dialog-id="'deleteClusterConfirm'" xpipe-title="'删除 cluster'"
                    xpipe-detail="'您确定要删除该cluster下的所有内容吗（所有的shards以及相应的redis实例都将被删除）?'"
                    xpipe-show-cancel-btn="true" xpipe-confirm="deleteCluster"></xpipeconfirmdialog>

